package Io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
//使用文件输入流读取文件数据
public class FISDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream = new FileInputStream("./fos.dat");
       //第一次读
        int a = fileInputStream.read();
        System.out.println(a);
        //第二次读
        a = fileInputStream.read();
        System.out.println(a);
        //第三次读  为空
        a = fileInputStream.read();
        System.out.println(a);  // -1；
        fileInputStream.close();
    }
}
